<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Renting extends Basc
{
    # 追加字段
    protected $appends = ["img_list"];
    public function getImgListAttribute(){
        $domain = $this->domain;
        $img = trim($this->card_img,"#");
        $imgs = explode("#",$img);
        return array_map(function($item) use ($domain) {
            return $domain.$item;
        },$imgs);
    }
}
